package com.pinda.controller;


import com.pinda.base.entity.PdCoreOrg;
import com.pinda.service.IPdCoreOrgService;
import com.pinda.vo.HomeVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 组织 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-06-24
 */
@RestController
@RequestMapping("/pd-core-org")
public class PdCoreOrgController {

    @Autowired
    IPdCoreOrgService iPdCoreOrgService;


    @RequestMapping("/queryPdOrg")
    public List queryPdOrg() {
        return this.iPdCoreOrgService.list();
    }

    @GetMapping("/findPdCoreOrgById")
    public PdCoreOrg findPdCoreOrgById(String id) {
        return this.iPdCoreOrgService.findPdCoreOrgById(id);
    }

    @GetMapping("/queryshoye/{id}")
    public HomeVo queryHomeController(@PathVariable("id") Integer id) {
        return this.iPdCoreOrgService.queryHomeService(id);
    }

    @GetMapping("/selectName/{id}")
    public String selectName(@PathVariable("id") long id) {
        return iPdCoreOrgService.selectName(id);
    }
}
